package com.ah.shanxi_demo.common;

/**
 * @author zt 2020/8/16
 */
public class PageUtils {

    public static Integer queryPageIndex(int pageIndex, int pageSize){
        pageIndex++;
        if (pageIndex==0){
            return 0;
        }
        int page = (pageIndex - 1) * pageSize;
        return page;
    }


    public static void main(String[] args) {
        Integer integer = queryPageIndex(2, 1);
        System.out.println(integer);
    }

}
